﻿<div class="container w-xl w-auto-xs" ng-controller="PwdCtrl">
    <a href class="navbar-brand block m-t">{{app.name}}</a>
    <div ng-controller="PwdCtrl">
        <div class="m-b-lg m-t-lg">
            <form name="reset" ng-init="isCollapsed=true" class="" ng-submit="verify()">
                <div class="list-group list-group-sm">
                    <div class="list-group-item">
                        <input placeholder="用户名" ng-model="phone" class="form-control no-border" required ng-disabled="!isCollapsed">
                    </div>
                    <div class="list-group-item m-t-sm">
                        <input type="email" placeholder="绑定的Email" ng-model="email" class="form-control no-border" required ng-disabled="!isCollapsed">
                    </div>
                </div>
                <p class="help-block">若未绑定Email，请联系管理员</p>
                <button type="submit" ng-disabled="reset.$invalid || !isCollapsed" class="btn btn-lg btn-primary btn-block">{{isCollapsed?'发送验证码':'已发送'}}</button>

            </form>
            <div collapse="isCollapsed" class="m-t">
                <div class="alert alert-success">
                    <form role="form" name="f_1005" ng-submit="setPwd()">
                        <div class="list-group list-group-sm">
                            <div class="list-group-item">
                                <input type="text" placeholder="Email验证码" ng-model="code" class="form-control no-border" required>
                            </div>
                            <div class="list-group-item m-t-sm">
                                <input type="password" placeholder="新密码" ng-model="pwd" class="form-control no-border" required>
                            </div>
                            <div class="list-group-item m-t-sm">
                                <input type="password" placeholder="确认新密码" ng-model="pwd2" class="form-control no-border" required>
                            </div>
                        </div>
                        <button type="submit" ng-disabled="f_1005.$invalid" class="btn btn-lg btn-primary btn-block">修改密码</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
  <div class="text-center" ng-include="'tpl/blocks/page-footer.html'"></div>
</div>